{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "from options.test_options import TestOptions\n",
    "from data import create_dataset\n",
    "from models import create_model\n",
    "from util.visualizer import save_images\n",
    "from util import html\n",
    "import util.util as util"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "usage: ipykernel_launcher.py [-h] [--dataroot DATAROOT] [--name NAME]\n",
      "                             [--easy_label EASY_LABEL] [--gpu_ids GPU_IDS]\n",
      "                             [--checkpoints_dir CHECKPOINTS_DIR]\n",
      "                             [--model MODEL] [--input_nc INPUT_NC]\n",
      "                             [--output_nc OUTPUT_NC] [--ngf NGF] [--ndf NDF]\n",
      "                             [--netD {basic,n_layers,pixel,patch,tilestylegan2,stylegan2}]\n",
      "                             [--netG {resnet_9blocks,resnet_6blocks,unet_256,unet_128,stylegan2,smallstylegan2,resnet_cat}]\n",
      "                             [--n_layers_D N_LAYERS_D]\n",
      "                             [--normG {instance,batch,none}]\n",
      "                             [--normD {instance,batch,none}]\n",
      "                             [--init_type {normal,xavier,kaiming,orthogonal}]\n",
      "                             [--init_gain INIT_GAIN]\n",
      "                             [--no_dropout [NO_DROPOUT]] [--no_antialias]\n",
      "                             [--no_antialias_up] [--dataset_mode DATASET_MODE]\n",
      "                             [--direction DIRECTION] [--serial_batches]\n",
      "                             [--num_threads NUM_THREADS]\n",
      "                             [--batch_size BATCH_SIZE] [--load_size LOAD_SIZE]\n",
      "                             [--crop_size CROP_SIZE]\n",
      "                             [--max_dataset_size MAX_DATASET_SIZE]\n",
      "                             [--preprocess PREPROCESS] [--no_flip]\n",
      "                             [--display_winsize DISPLAY_WINSIZE]\n",
      "                             [--random_scale_max RANDOM_SCALE_MAX]\n",
      "                             [--epoch EPOCH] [--verbose] [--suffix SUFFIX]\n",
      "                             [--stylegan2_G_num_downsampling STYLEGAN2_G_NUM_DOWNSAMPLING]\n",
      "                             [--results_dir RESULTS_DIR] [--phase PHASE]\n",
      "                             [--eval] [--num_test NUM_TEST]\n",
      "                             [--CUT_mode {,C,U,T,,, ,c,u,t,,, ,F,a,s,t,C,U,T,,, ,f,a,s,t,c,u,t,}]\n",
      "                             [--lambda_GAN LAMBDA_GAN]\n",
      "                             [--lambda_NCE LAMBDA_NCE]\n",
      "                             [--lambda_DisNCE LAMBDA_DISNCE]\n",
      "                             [--nce_idt [NCE_IDT]] [--nce_layers NCE_LAYERS]\n",
      "                             [--nce_includes_all_negatives_from_minibatch [NCE_INCLUDES_ALL_NEGATIVES_FROM_MINIBATCH]]\n",
      "                             [--netF {sample,reshape,mlp_pixel,mlp_patch}]\n",
      "                             [--netF_nc NETF_NC] [--nce_T NCE_T]\n",
      "                             [--num_patches NUM_PATCHES]\n",
      "                             [--flip_equivariance [FLIP_EQUIVARIANCE]]\n",
      "ipykernel_launcher.py: error: unrecognized arguments: -f /root/.local/share/jupyter/runtime/kernel-6b11d6b5-24cb-41a8-8305-8e05a55379bc.json\n"
     ]
    },
    {
     "ename": "SystemExit",
     "evalue": "2",
     "output_type": "error",
     "traceback": [
      "An exception has occurred, use %tb to see the full traceback.\n",
      "\u001b[0;31mSystemExit\u001b[0m\u001b[0;31m:\u001b[0m 2\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py:3275: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.\n",
      "  warn(\"To exit: use 'exit', 'quit', or Ctrl-D.\", stacklevel=1)\n"
     ]
    }
   ],
   "source": [
    "opt = TestOptions().parse()  # get test options\n",
    "# hard-code some parameters for test\n",
    "opt.num_threads = 0   # test code only supports num_threads = 1\n",
    "opt.batch_size = 1    # test code only supports batch_size = 1\n",
    "opt.serial_batches = True  # disable data shuffling; comment this line if results on randomly chosen images are needed.\n",
    "opt.no_flip = True    # no flip; comment this line if results on flipped images are needed.\n",
    "opt.display_id = -1   # no visdom display; the test code saves the results to a HTML file.\n",
    "dataset = create_dataset(opt)  # create a dataset given opt.dataset_mode and other options\n",
    "train_dataset = create_dataset(util.copyconf(opt, phase=\"train\"))\n",
    "model = create_model(opt)      # create a model given opt.model and other options"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
